﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{
    [Serializable]
    public class BCSingleMT : BCMT3DMS, ICloneable
    {
        public BCSingleMT(List<string> names):base()
        {
            foreach (string name in names)
            {

                MultiValue mv = new MultiValue(name);

                this._specConc.Add(mv);


            }




        }



        List<MultiValue> _specConc = new List<MultiValue>();

        public List<MultiValue> SpecConc
        {
            get { return _specConc; }

        }


        //public override void OnNPeriodsChanged()
        //{
        //    base.OnNPeriodsChanged();

        //    foreach (MultiValue item in this._specConc)
        //    {
        //        item.NPeriods = this.NPeriods;

        //    }

        //}




        public override void OnSpeListChanged(List<string> lst)
        {
            base.OnSpeListChanged(lst);

            //写一个算法，要保证顺序性
            this._specConc.Clear();
            foreach (string name in lst)
            {

                MultiValue mv = new MultiValue(name);

                this._specConc.Add(mv);


            }



        }




        public override void MapToMT3DMs(List<double> stressPeriods, MT3DMS.DomainLayer.MT3DMSData data, CoverageSetup setup, FeatureObject fo)
        {

            //作为基类，直接return;




            //if (data == null || setup == null || fo == null)
            //{
            //    return;
            //}

            //if (fo is LineFO || fo is PointFO || fo is PolygonFO)
            //{
            //    //data.SourceSinkMixing.SpMixings.Clear();
            //    for (int i = 0; i < fo.LstIJK.Count; i++)
            //    {
            //        List<string> arryStr = new List<string>();
            //        List<List<double>> arrydata = new List<List<double>>();
            //        for (int j = 0; j < fo.SpecConc.SpecConc.Count; j++)
            //        {
            //            arryStr.Add(fo.SpecConc.SpecConc[j].Name);
            //            arrydata.Add(fo.SpecConc.SpecConc[j].Datas);
            //        }

            //        HA.MT3DMS.DomainLayer.MixingItem mi = new MT3DMS.DomainLayer.MixingItem(fo.LstIJK[i].I, fo.LstIJK[i].J, fo.LstIJK[i].K, MT3DMS.DomainLayer.MixingSSType.SECCONC, fo.SpecConc.NPeriods, arryStr, arrydata);
            //        data.SourceSinkMixing.SpMixings.Add(mi);
            //    }
            //}



        }



        public object Clone()
        {
            return this.MemberwiseClone();
        }


    }
}
